unit VW_GL_ACCOUNT;


interface
uses
  Classes,SysUtils,DB,Uni,UniEngine;

type
  TVWGLACCOUNT=class(TUniEngine)
  private
    FSETYEAR  : Extended;
    FACCOUNTID: string;
    FACCOUNTCODE: string;
    FDISPCODE : string;
    FACCOUNTNAME: string;
    FLEVELNUM : Extended;
    FISLEAF   : Extended;
    FENABLED  : Extended;
    FCREATEDATE: string;
    FCREATEUSER: string;
    FLATESTOPDATE: string;
    FISDELETED: Extended;
    FLATESTOPUSER: string;
    FLASTVER  : string;
    FCHRCODE1 : string;
    FCHRCODE2 : string;
    FCHRCODE3 : string;
    FCHRCODE4 : string;
    FCHRCODE5 : string;
    FRGCODE   : string;
    FBALANCESIDE: Extended;
    FSUBJECTTYPE: Extended;
    FPARENTID : string;
    FCHRID1   : string;
    FCHRID2   : string;
    FCHRID3   : string;
    FCHRID4   : string;
    FCHRID5   : string;
    FSTID     : string;
    FSUBJECTKIND: Extended;
    FCOAID    : string;
    FHINTCODE : string;
    FTABLENAME: string;
    FBALANCEPERIODTYPE: Extended;
    FMONTHDETAILTABLENAME: string;
  protected
    procedure SetParameters;override;
    function  GetStrInsert:string;override;
    function  GetStrUpdate:string;override;
    function  GetStrDelete:string;override;
  public
    function  GetStrsIndex:string;override;
  public
    function  GetNextIdex:Integer;overload;
    function  GetNextIdex(AUniConnection:TUniConnection):Integer;overload;
  public
    function  CheckExist(AUniConnection:TUniConnection):Boolean;override;
  public
    destructor  Destroy; override;
    constructor Create;  
  published
    property SETYEAR  : Extended read FSETYEAR   write FSETYEAR;
    property ACCOUNTID: string read FACCOUNTID write FACCOUNTID;
    property ACCOUNTCODE: string read FACCOUNTCODE write FACCOUNTCODE;
    property DISPCODE : string read FDISPCODE  write FDISPCODE;
    property ACCOUNTNAME: string read FACCOUNTNAME write FACCOUNTNAME;
    property LEVELNUM : Extended read FLEVELNUM  write FLEVELNUM;
    property ISLEAF   : Extended read FISLEAF    write FISLEAF;
    property ENABLED  : Extended read FENABLED   write FENABLED;
    property CREATEDATE: string read FCREATEDATE write FCREATEDATE;
    property CREATEUSER: string read FCREATEUSER write FCREATEUSER;
    property LATESTOPDATE: string read FLATESTOPDATE write FLATESTOPDATE;
    property ISDELETED: Extended read FISDELETED write FISDELETED;
    property LATESTOPUSER: string read FLATESTOPUSER write FLATESTOPUSER;
    property LASTVER  : string read FLASTVER   write FLASTVER;
    property CHRCODE1 : string read FCHRCODE1  write FCHRCODE1;
    property CHRCODE2 : string read FCHRCODE2  write FCHRCODE2;
    property CHRCODE3 : string read FCHRCODE3  write FCHRCODE3;
    property CHRCODE4 : string read FCHRCODE4  write FCHRCODE4;
    property CHRCODE5 : string read FCHRCODE5  write FCHRCODE5;
    property RGCODE   : string read FRGCODE    write FRGCODE;
    property BALANCESIDE: Extended read FBALANCESIDE write FBALANCESIDE;
    property SUBJECTTYPE: Extended read FSUBJECTTYPE write FSUBJECTTYPE;
    property PARENTID : string read FPARENTID  write FPARENTID;
    property CHRID1   : string read FCHRID1    write FCHRID1;
    property CHRID2   : string read FCHRID2    write FCHRID2;
    property CHRID3   : string read FCHRID3    write FCHRID3;
    property CHRID4   : string read FCHRID4    write FCHRID4;
    property CHRID5   : string read FCHRID5    write FCHRID5;
    property STID     : string read FSTID      write FSTID;
    property SUBJECTKIND: Extended read FSUBJECTKIND write FSUBJECTKIND;
    property COAID    : string read FCOAID     write FCOAID;
    property HINTCODE : string read FHINTCODE  write FHINTCODE;
    property TABLENAME: string read FTABLENAME write FTABLENAME;
    property BALANCEPERIODTYPE: Extended read FBALANCEPERIODTYPE write FBALANCEPERIODTYPE;
    property MONTHDETAILTABLENAME: string read FMONTHDETAILTABLENAME write FMONTHDETAILTABLENAME;    
  public
    class function  ReadDS(AUniQuery:TUniQuery):TUniEngine;override;
    class procedure ReadDS(AUniQuery:TUniQuery;var Result:TUniEngine);override;
    class function  CopyIt(AVWGLACCOUNT:TVWGLACCOUNT):TVWGLACCOUNT;overload;        
    class procedure CopyIt(AVWGLACCOUNT:TVWGLACCOUNT;var Result:TVWGLACCOUNT);overload;       
  end;

implementation

{ TVWGLACCOUNT }
procedure TVWGLACCOUNT.SetParameters;
begin
  inherited;
  with FUniSQL.Params do
  begin
    case FOptTyp of
      otAddx:
      begin
        ParamByName('SET_YEAR').Value := SETYEAR;
        ParamByName('ACCOUNT_ID').Value := ACCOUNTID;
        ParamByName('ACCOUNT_CODE').Value := ACCOUNTCODE;
        ParamByName('DISP_CODE').Value := DISPCODE;
        ParamByName('ACCOUNT_NAME').Value := ACCOUNTNAME;
        ParamByName('LEVEL_NUM').Value := LEVELNUM;
        ParamByName('IS_LEAF').Value := ISLEAF;
        ParamByName('ENABLED').Value := ENABLED;
        ParamByName('CREATE_DATE').Value := CREATEDATE;
        ParamByName('CREATE_USER').Value := CREATEUSER;
        ParamByName('LATEST_OP_DATE').Value := LATESTOPDATE;
        ParamByName('IS_DELETED').Value := ISDELETED;
        ParamByName('LATEST_OP_USER').Value := LATESTOPUSER;
        ParamByName('LAST_VER').Value := LASTVER;
        ParamByName('CHR_CODE1').Value := CHRCODE1;
        ParamByName('CHR_CODE2').Value := CHRCODE2;
        ParamByName('CHR_CODE3').Value := CHRCODE3;
        ParamByName('CHR_CODE4').Value := CHRCODE4;
        ParamByName('CHR_CODE5').Value := CHRCODE5;
        ParamByName('RG_CODE').Value := RGCODE;
        ParamByName('BALANCE_SIDE').Value := BALANCESIDE;
        ParamByName('SUBJECT_TYPE').Value := SUBJECTTYPE;
        ParamByName('PARENT_ID').Value := PARENTID;
        ParamByName('CHR_ID1').Value := CHRID1;
        ParamByName('CHR_ID2').Value := CHRID2;
        ParamByName('CHR_ID3').Value := CHRID3;
        ParamByName('CHR_ID4').Value := CHRID4;
        ParamByName('CHR_ID5').Value := CHRID5;
        ParamByName('ST_ID').Value := STID;
        ParamByName('SUBJECT_KIND').Value := SUBJECTKIND;
        ParamByName('COA_ID').Value := COAID;
        ParamByName('HINT_CODE').Value := HINTCODE;
        ParamByName('TABLE_NAME').Value := TABLENAME;
        ParamByName('BALANCE_PERIOD_TYPE').Value := BALANCEPERIODTYPE;
        ParamByName('MONTHDETAIL_TABLE_NAME').Value := MONTHDETAILTABLENAME; 
      end;
      otEdit:
      begin
        ParamByName('SET_YEAR').Value := SETYEAR;
        ParamByName('ACCOUNT_ID').Value := ACCOUNTID;
        ParamByName('ACCOUNT_CODE').Value := ACCOUNTCODE;
        ParamByName('DISP_CODE').Value := DISPCODE;
        ParamByName('ACCOUNT_NAME').Value := ACCOUNTNAME;
        ParamByName('LEVEL_NUM').Value := LEVELNUM;
        ParamByName('IS_LEAF').Value := ISLEAF;
        ParamByName('ENABLED').Value := ENABLED;
        ParamByName('CREATE_DATE').Value := CREATEDATE;
        ParamByName('CREATE_USER').Value := CREATEUSER;
        ParamByName('LATEST_OP_DATE').Value := LATESTOPDATE;
        ParamByName('IS_DELETED').Value := ISDELETED;
        ParamByName('LATEST_OP_USER').Value := LATESTOPUSER;
        ParamByName('LAST_VER').Value := LASTVER;
        ParamByName('CHR_CODE1').Value := CHRCODE1;
        ParamByName('CHR_CODE2').Value := CHRCODE2;
        ParamByName('CHR_CODE3').Value := CHRCODE3;
        ParamByName('CHR_CODE4').Value := CHRCODE4;
        ParamByName('CHR_CODE5').Value := CHRCODE5;
        ParamByName('RG_CODE').Value := RGCODE;
        ParamByName('BALANCE_SIDE').Value := BALANCESIDE;
        ParamByName('SUBJECT_TYPE').Value := SUBJECTTYPE;
        ParamByName('PARENT_ID').Value := PARENTID;
        ParamByName('CHR_ID1').Value := CHRID1;
        ParamByName('CHR_ID2').Value := CHRID2;
        ParamByName('CHR_ID3').Value := CHRID3;
        ParamByName('CHR_ID4').Value := CHRID4;
        ParamByName('CHR_ID5').Value := CHRID5;
        ParamByName('ST_ID').Value := STID;
        ParamByName('SUBJECT_KIND').Value := SUBJECTKIND;
        ParamByName('COA_ID').Value := COAID;
        ParamByName('HINT_CODE').Value := HINTCODE;
        ParamByName('TABLE_NAME').Value := TABLENAME;
        ParamByName('BALANCE_PERIOD_TYPE').Value := BALANCEPERIODTYPE;
        ParamByName('MONTHDETAIL_TABLE_NAME').Value := MONTHDETAILTABLENAME; 
      end;  
      otDelt:
      begin
 
      end;  
    end;
  end;
end;

function TVWGLACCOUNT.CheckExist(AUniConnection: TUniConnection): Boolean;
begin
  Result:=CheckExist('VW_GL_ACCOUNT',[],AUniConnection);
end;

function TVWGLACCOUNT.GetNextIdex: Integer;
begin

end;

function TVWGLACCOUNT.GetNextIdex(AUniConnection: TUniConnection): Integer;
begin

end;

function TVWGLACCOUNT.GetStrDelete: string;
begin
  Result:='DELETE FROM VW_GL_ACCOUNT WHERE  ';
end;

function TVWGLACCOUNT.GetStrInsert: string;
begin
  Result:='INSERT INTO VW_GL_ACCOUNT'
         +'    ( SET_YEAR, ACCOUNT_ID, ACCOUNT_CODE, DISP_CODE, ACCOUNT_NAME'
         +'    , LEVEL_NUM, IS_LEAF, ENABLED, CREATE_DATE, CREATE_USER'
         +'    , LATEST_OP_DATE, IS_DELETED, LATEST_OP_USER, LAST_VER'
         +'    , CHR_CODE1, CHR_CODE2, CHR_CODE3, CHR_CODE4, CHR_CODE5'
         +'    , RG_CODE, BALANCE_SIDE, SUBJECT_TYPE, PARENT_ID, CHR_ID1'
         +'    , CHR_ID2, CHR_ID3, CHR_ID4, CHR_ID5, ST_ID, SUBJECT_KIND'
         +'    , COA_ID, HINT_CODE, TABLE_NAME, BALANCE_PERIOD_TYPE'
         +'    , MONTHDETAIL_TABLE_NAME)'
         +'    VALUES'
         +'    (:SET_YEAR,:ACCOUNT_ID,:ACCOUNT_CODE,:DISP_CODE,:ACCOUNT_NAME'
         +'    ,:LEVEL_NUM,:IS_LEAF,:ENABLED,:CREATE_DATE,:CREATE_USER'
         +'    ,:LATEST_OP_DATE,:IS_DELETED,:LATEST_OP_USER,:LAST_VER'
         +'    ,:CHR_CODE1,:CHR_CODE2,:CHR_CODE3,:CHR_CODE4,:CHR_CODE5'
         +'    ,:RG_CODE,:BALANCE_SIDE,:SUBJECT_TYPE,:PARENT_ID,:CHR_ID1'
         +'    ,:CHR_ID2,:CHR_ID3,:CHR_ID4,:CHR_ID5,:ST_ID,:SUBJECT_KIND'
         +'    ,:COA_ID,:HINT_CODE,:TABLE_NAME,:BALANCE_PERIOD_TYPE'
         +'    ,:MONTHDETAIL_TABLE_NAME)';
end;

function TVWGLACCOUNT.GetStrsIndex: string;
begin
  Result:=Format('',[]);
end;

function TVWGLACCOUNT.GetStrUpdate: string;
begin
  raise Exception.Create('NOT SUPPORT THIS METHOD:[TVWGLACCOUNT.GetStrUpdate] AT [VW_GL_ACCOUNT.pas]');
end;

constructor TVWGLACCOUNT.Create;
begin

end;

destructor TVWGLACCOUNT.Destroy;
begin

  inherited;
end;

class function TVWGLACCOUNT.ReadDS(AUniQuery: TUniQuery): TUniEngine;
var
  I:Integer;
  Field:TField;
  FieldName:string;
begin
  Result:=TVWGLACCOUNT.Create;

  with TVWGLACCOUNT(Result) do
  begin
    for I:=0 to AUniQuery.Fields.Count-1 do
    begin
      Field:=AUniQuery.Fields.Fields[I];
      //if field.fieldname is not all uppercase,please use uppercase().
      FieldName:=Field.FieldName;
      if FieldName='SET_YEAR' then
      begin
        SETYEAR  :=Field.AsFloat;
      end else
      if FieldName='ACCOUNT_ID' then
      begin
        ACCOUNTID:=Field.AsString;
      end else
      if FieldName='ACCOUNT_CODE' then
      begin
        ACCOUNTCODE:=Field.AsString;
      end else
      if FieldName='DISP_CODE' then
      begin
        DISPCODE :=Field.AsString;
      end else
      if FieldName='ACCOUNT_NAME' then
      begin
        ACCOUNTNAME:=Field.AsString;
      end else
      if FieldName='LEVEL_NUM' then
      begin
        LEVELNUM :=Field.AsFloat;
      end else
      if FieldName='IS_LEAF' then
      begin
        ISLEAF   :=Field.AsFloat;
      end else
      if FieldName='ENABLED' then
      begin
        ENABLED  :=Field.AsFloat;
      end else
      if FieldName='CREATE_DATE' then
      begin
        CREATEDATE:=Field.AsString;
      end else
      if FieldName='CREATE_USER' then
      begin
        CREATEUSER:=Field.AsString;
      end else
      if FieldName='LATEST_OP_DATE' then
      begin
        LATESTOPDATE:=Field.AsString;
      end else
      if FieldName='IS_DELETED' then
      begin
        ISDELETED:=Field.AsFloat;
      end else
      if FieldName='LATEST_OP_USER' then
      begin
        LATESTOPUSER:=Field.AsString;
      end else
      if FieldName='LAST_VER' then
      begin
        LASTVER  :=Field.AsString;
      end else
      if FieldName='CHR_CODE1' then
      begin
        CHRCODE1 :=Field.AsString;
      end else
      if FieldName='CHR_CODE2' then
      begin
        CHRCODE2 :=Field.AsString;
      end else
      if FieldName='CHR_CODE3' then
      begin
        CHRCODE3 :=Field.AsString;
      end else
      if FieldName='CHR_CODE4' then
      begin
        CHRCODE4 :=Field.AsString;
      end else
      if FieldName='CHR_CODE5' then
      begin
        CHRCODE5 :=Field.AsString;
      end else
      if FieldName='RG_CODE' then
      begin
        RGCODE   :=Field.AsString;
      end else
      if FieldName='BALANCE_SIDE' then
      begin
        BALANCESIDE:=Field.AsFloat;
      end else
      if FieldName='SUBJECT_TYPE' then
      begin
        SUBJECTTYPE:=Field.AsFloat;
      end else
      if FieldName='PARENT_ID' then
      begin
        PARENTID :=Field.AsString;
      end else
      if FieldName='CHR_ID1' then
      begin
        CHRID1   :=Field.AsString;
      end else
      if FieldName='CHR_ID2' then
      begin
        CHRID2   :=Field.AsString;
      end else
      if FieldName='CHR_ID3' then
      begin
        CHRID3   :=Field.AsString;
      end else
      if FieldName='CHR_ID4' then
      begin
        CHRID4   :=Field.AsString;
      end else
      if FieldName='CHR_ID5' then
      begin
        CHRID5   :=Field.AsString;
      end else
      if FieldName='ST_ID' then
      begin
        STID     :=Field.AsString;
      end else
      if FieldName='SUBJECT_KIND' then
      begin
        SUBJECTKIND:=Field.AsFloat;
      end else
      if FieldName='COA_ID' then
      begin
        COAID    :=Field.AsString;
      end else
      if FieldName='HINT_CODE' then
      begin
        HINTCODE :=Field.AsString;
      end else
      if FieldName='TABLE_NAME' then
      begin
        TABLENAME:=Field.AsString;
      end else
      if FieldName='BALANCE_PERIOD_TYPE' then
      begin
        BALANCEPERIODTYPE:=Field.AsFloat;
      end else
      if FieldName='MONTHDETAIL_TABLE_NAME' then
      begin
        MONTHDETAILTABLENAME:=Field.AsString;
      end;
    end
  end;  
end;

class procedure TVWGLACCOUNT.ReadDS(AUniQuery: TUniQuery; var Result: TUniEngine);
var
  I:Integer;
  Field:TField;
  FieldName:string;
begin
  if Result=nil then Exit;

  with TVWGLACCOUNT(Result) do
  begin
    for I:=0 to AUniQuery.Fields.Count-1 do
    begin
      Field:=AUniQuery.Fields.Fields[I];
      //if field.fieldname is not all uppercase,please use uppercase().
      FieldName:=Field.FieldName;
      if FieldName='SET_YEAR' then
      begin
        SETYEAR  :=Field.AsFloat;
      end else
      if FieldName='ACCOUNT_ID' then
      begin
        ACCOUNTID:=Field.AsString;
      end else
      if FieldName='ACCOUNT_CODE' then
      begin
        ACCOUNTCODE:=Field.AsString;
      end else
      if FieldName='DISP_CODE' then
      begin
        DISPCODE :=Field.AsString;
      end else
      if FieldName='ACCOUNT_NAME' then
      begin
        ACCOUNTNAME:=Field.AsString;
      end else
      if FieldName='LEVEL_NUM' then
      begin
        LEVELNUM :=Field.AsFloat;
      end else
      if FieldName='IS_LEAF' then
      begin
        ISLEAF   :=Field.AsFloat;
      end else
      if FieldName='ENABLED' then
      begin
        ENABLED  :=Field.AsFloat;
      end else
      if FieldName='CREATE_DATE' then
      begin
        CREATEDATE:=Field.AsString;
      end else
      if FieldName='CREATE_USER' then
      begin
        CREATEUSER:=Field.AsString;
      end else
      if FieldName='LATEST_OP_DATE' then
      begin
        LATESTOPDATE:=Field.AsString;
      end else
      if FieldName='IS_DELETED' then
      begin
        ISDELETED:=Field.AsFloat;
      end else
      if FieldName='LATEST_OP_USER' then
      begin
        LATESTOPUSER:=Field.AsString;
      end else
      if FieldName='LAST_VER' then
      begin
        LASTVER  :=Field.AsString;
      end else
      if FieldName='CHR_CODE1' then
      begin
        CHRCODE1 :=Field.AsString;
      end else
      if FieldName='CHR_CODE2' then
      begin
        CHRCODE2 :=Field.AsString;
      end else
      if FieldName='CHR_CODE3' then
      begin
        CHRCODE3 :=Field.AsString;
      end else
      if FieldName='CHR_CODE4' then
      begin
        CHRCODE4 :=Field.AsString;
      end else
      if FieldName='CHR_CODE5' then
      begin
        CHRCODE5 :=Field.AsString;
      end else
      if FieldName='RG_CODE' then
      begin
        RGCODE   :=Field.AsString;
      end else
      if FieldName='BALANCE_SIDE' then
      begin
        BALANCESIDE:=Field.AsFloat;
      end else
      if FieldName='SUBJECT_TYPE' then
      begin
        SUBJECTTYPE:=Field.AsFloat;
      end else
      if FieldName='PARENT_ID' then
      begin
        PARENTID :=Field.AsString;
      end else
      if FieldName='CHR_ID1' then
      begin
        CHRID1   :=Field.AsString;
      end else
      if FieldName='CHR_ID2' then
      begin
        CHRID2   :=Field.AsString;
      end else
      if FieldName='CHR_ID3' then
      begin
        CHRID3   :=Field.AsString;
      end else
      if FieldName='CHR_ID4' then
      begin
        CHRID4   :=Field.AsString;
      end else
      if FieldName='CHR_ID5' then
      begin
        CHRID5   :=Field.AsString;
      end else
      if FieldName='ST_ID' then
      begin
        STID     :=Field.AsString;
      end else
      if FieldName='SUBJECT_KIND' then
      begin
        SUBJECTKIND:=Field.AsFloat;
      end else
      if FieldName='COA_ID' then
      begin
        COAID    :=Field.AsString;
      end else
      if FieldName='HINT_CODE' then
      begin
        HINTCODE :=Field.AsString;
      end else
      if FieldName='TABLE_NAME' then
      begin
        TABLENAME:=Field.AsString;
      end else
      if FieldName='BALANCE_PERIOD_TYPE' then
      begin
        BALANCEPERIODTYPE:=Field.AsFloat;
      end else
      if FieldName='MONTHDETAIL_TABLE_NAME' then
      begin
        MONTHDETAILTABLENAME:=Field.AsString;
      end;
    end
  end;  
end;

class function  TVWGLACCOUNT.CopyIt(AVWGLACCOUNT: TVWGLACCOUNT): TVWGLACCOUNT;
begin
  Result:=TVWGLACCOUNT.Create;
  TVWGLACCOUNT.CopyIt(AVWGLACCOUNT,Result)
end;

class procedure TVWGLACCOUNT.CopyIt(AVWGLACCOUNT:TVWGLACCOUNT;var Result:TVWGLACCOUNT);
begin
  if Result=nil then Exit;
  Result.SETYEAR  :=AVWGLACCOUNT.SETYEAR;
  Result.ACCOUNTID:=AVWGLACCOUNT.ACCOUNTID;
  Result.ACCOUNTCODE:=AVWGLACCOUNT.ACCOUNTCODE;
  Result.DISPCODE :=AVWGLACCOUNT.DISPCODE;
  Result.ACCOUNTNAME:=AVWGLACCOUNT.ACCOUNTNAME;
  Result.LEVELNUM :=AVWGLACCOUNT.LEVELNUM;
  Result.ISLEAF   :=AVWGLACCOUNT.ISLEAF;
  Result.ENABLED  :=AVWGLACCOUNT.ENABLED;
  Result.CREATEDATE:=AVWGLACCOUNT.CREATEDATE;
  Result.CREATEUSER:=AVWGLACCOUNT.CREATEUSER;
  Result.LATESTOPDATE:=AVWGLACCOUNT.LATESTOPDATE;
  Result.ISDELETED:=AVWGLACCOUNT.ISDELETED;
  Result.LATESTOPUSER:=AVWGLACCOUNT.LATESTOPUSER;
  Result.LASTVER  :=AVWGLACCOUNT.LASTVER;
  Result.CHRCODE1 :=AVWGLACCOUNT.CHRCODE1;
  Result.CHRCODE2 :=AVWGLACCOUNT.CHRCODE2;
  Result.CHRCODE3 :=AVWGLACCOUNT.CHRCODE3;
  Result.CHRCODE4 :=AVWGLACCOUNT.CHRCODE4;
  Result.CHRCODE5 :=AVWGLACCOUNT.CHRCODE5;
  Result.RGCODE   :=AVWGLACCOUNT.RGCODE;
  Result.BALANCESIDE:=AVWGLACCOUNT.BALANCESIDE;
  Result.SUBJECTTYPE:=AVWGLACCOUNT.SUBJECTTYPE;
  Result.PARENTID :=AVWGLACCOUNT.PARENTID;
  Result.CHRID1   :=AVWGLACCOUNT.CHRID1;
  Result.CHRID2   :=AVWGLACCOUNT.CHRID2;
  Result.CHRID3   :=AVWGLACCOUNT.CHRID3;
  Result.CHRID4   :=AVWGLACCOUNT.CHRID4;
  Result.CHRID5   :=AVWGLACCOUNT.CHRID5;
  Result.STID     :=AVWGLACCOUNT.STID;
  Result.SUBJECTKIND:=AVWGLACCOUNT.SUBJECTKIND;
  Result.COAID    :=AVWGLACCOUNT.COAID;
  Result.HINTCODE :=AVWGLACCOUNT.HINTCODE;
  Result.TABLENAME:=AVWGLACCOUNT.TABLENAME;
  Result.BALANCEPERIODTYPE:=AVWGLACCOUNT.BALANCEPERIODTYPE;
  Result.MONTHDETAILTABLENAME:=AVWGLACCOUNT.MONTHDETAILTABLENAME;
end;

end.

